package gemini.basic.manager;

import gemini.basic.dto.SearchProductCriteria;
import gemini.basic.model.Product;
import gemini.basic.model.ProductType;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

@Transactional(rollbackFor = Throwable.class)
public interface ProductManager {
	public Product getProductByCode(String code);

	public List<ProductType> getAllCategory();

	public List<Product> findProduct(SearchProductCriteria criteria);

	public ProductType getCategoryByCode(String code);
	
	public void deleteProductType(Integer id);
	
	public ProductType saveOrUpdateProductType(ProductType productType);
	
	public void deleteProduct(Integer id);
	
	public Product saveOrUpdateProduct(Product product);
	
	public List<Product> getAllProducts();
}
